package com.sx.first.action;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.sx.first.biz.UserBiz;
import com.sx.first.model.User;

@Controller
@Scope("prototype")
@Namespace("/user")
public class UserAction extends BaseAction {
	private List<User> userList;
	private User user;
	private UserBiz userBiz;

	@Action(value = "list",results = {
			@Result(name = "list",location = "list.jsp")
	})
	public String list() {
		userList = userBiz.findAll();
		return "list";
	}
	
	/******************************/
	
	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public UserBiz getUserBiz() {
		return userBiz;
	}

	public void setUserBiz(UserBiz userBiz) {
		this.userBiz = userBiz;
	}

	

}
